#pragma once

//WGLENGINE_DLL
#ifdef WGLENGINE_DLL
#define WGLENGINE_EXPORT __declspec(dllexport)
#else
#define WGLENGINE_EXPORT __declspec(dllimport)
#endif

#include <string>
#include <vector>

#include "SceneMesh.h"
#include "Transform.h"

#include "WObject.h"

class WRenderer;
class WGLENGINE_EXPORT SceneNode : public WObject
{
protected:
	std::string name;
	std::vector<std::shared_ptr<SceneNode>> children;
	std::vector<std::shared_ptr<SceneMesh>> meshes;

public:
	SceneNode(std::string name);
	~SceneNode();

	void AddChild(std::shared_ptr<SceneNode> child);
	void AddMesh(std::shared_ptr<SceneMesh> mesh);

	glm::mat4 GetModelMatrix();
	void SetModelMatrix(glm::mat4 matrix);
	
	virtual void Render(int pass);
	virtual void Update(std::shared_ptr<WRenderer> renderer);

};